﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="QuotationDetail.aspx.cs" MasterPageFile="~/Masters/WithoutPermBasic.Master" Inherits="PMS.UI.CM.ProductOrder" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script src="/Scripts/Jquery/jquery.form.js"></script>
    <script type="text/javascript">
        $(function () {
            var height = parseInt($("#divTotal").height() * 0.94);
            var a1 = height / 3;
            var a2 = a1 * 2;
            $("#prodDetailTechParam").height(a1);
            $("#productionDetail").height(a2)
        });

    </script>
    <script type="text/javascript">
        var action = com.get.action;
        var quotationID = "0";
        var quotationState = "0";
        var productionDetailID = "";
        var importMethod = "";
        if ("add" == action) { } else {
            quotationID = com.get.Id;
            quotationState = com.get.State;
        }

        $(function () {

            // 加载报价单产品细则          
            $("#productionDetail").datagrid({
                url: '/Logic/CM/QuotationAjax.aspx?method=GetProductionDetail',
                queryParams: { "Id": quotationID },
                loadMsg: '数据加载中请稍后……',
                rownumbers: true,
                toolbar: "#divToobarPD",
                idField: "ID",
                singleSelect: true,
                columns: [[
                    {
                        field: 'ck', checkbox: true, width: 30
                    }, {
                        field: 'QuotationID', hidden: true
                    },
                    {
                        field: 'ID', title: 'ID', sortable: true, align: 'center', width: 60
                    },
                    {
                        field: 'ProductName', title: '产品名称', sortable: true, align: "center", width: 200,
                        formatter: function (value, row, index) {
                            if (null == value) value = "";
                            if (quotationState != "0") {
                                return "<input id='ProductName' name='ProductName' disabled='disabled'  value='" + value + "' readonly='readonly'  style='width:180px' />";
                            }
                            else {
                                return "<input id='ProductName' name='ProductName'  value='" + value + "'style='width:180px' />";
                            }
                            //return "<input id='ProductName' name='ProductName' value='" + value + "' readonly='readonly'  style='width:180px' />";
                        }
                    },
                     {
                         field: 'BottleVolume', title: '规格（L）', align: "center", width: 60, formatter: function (value, row, index) {
                             if (null == value) value = "";
                             if (quotationState != "0") {
                                 return "<input id='BottleVolume' name='BottleVolume' disabled='disabled'  value='" + value + "' readonly='readonly'  style='width:40px' />";
                             }
                             else {
                                 return "<input id='BottleVolume' name='BottleVolume'  value='" + value + "' style='width:40px' />";
                             }
                             //return "<input id='BottleVolume' name='BottleVolume' value='" + value + "' readonly='readonly'  style='width:40px' />";
                         }
                     }, {
                         field: 'unit', title: '单位', align: "center", width: 60,
                         formatter: function (value, row, index) {
                             if (null == value) value = "";
                             if (quotationState != "0") {
                                 return "<input id='unit' name='unit' disabled='disabled'  value='" + value + "' readonly='readonly'  style='width:40px' />";
                             }
                             else {
                                 return "<input id='unit' name='unit'  value='" + value + "' style='width:40px' />";
                             }
                             //return "<input id='unit' name='unit' value='" + value + "' readonly='readonly'  style='width:40px' />";
                         }
                     },
                    {
                        field: 'OrderCount', title: '计划数量', align: "center", width: 60,
                        formatter: function (value, row, index) {
                            if (null == value) value = "";
                            if (quotationState != "0") {
                                return "<input id='OrderCount' name='OrderCount' disabled='disabled'  value='" + value + "' readonly='readonly'  style='width:40px'/>";
                            }
                            else {
                                return "<input id='OrderCount' name='OrderCount'  value='" + value + "' style='width:40px' />";
                            }
                            //return "<input id='OrderCount' name='OrderCount' value='" + value + "' readonly='readonly' style='width:40px'/>";
                        }
                    },
                    {
                        field: 'SinglePrice', title: '单价', align: "center", width: 60,
                        formatter: function (value, row, index) {
                            if (null == value) value = "";
                            if (quotationState != "0") {
                                return "<input id='SinglePrice' name='SinglePrice' disabled='disabled' value='" + value + "' readonly='readonly'  style='width:40px' />";
                            }
                            else {
                                return "<input id='SinglePrice' name='SinglePrice'  value='" + value + "' style='width:40px' />";
                            }
                            //return "<input id='SinglePrice' name='SinglePrice' value='" + value + "' readonly='readonly' style='width:40px' />";
                        }
                    },
                    {
                        field: 'BottleCount', title: '钢瓶数量', align: "center", width: 60,
                        formatter: function (value, row, index) {
                            if (null == value) value = "";
                            if (quotationState != "0") {
                                return "<input id='BottleCount' name='BottleCount' disabled='disabled'  value='" + value + "' readonly='readonly'  style='width:40px'/>";
                            }
                            else {
                                return "<input id='BottleCount' name='BottleCount'  value='" + value + "' style='width:40px' />";
                            }
                            //return "<input id='BottleCount' name='BottleCount' value='" + value + "' readonly='readonly' style='width:40px'/>";
                        }
                    },
                    {
                        field: 'BottlePrice', title: '钢瓶单价', align: "center", width: 60,
                        formatter: function (value, row, index) {
                            if (null == value) value = "";
                            if (quotationState != "0") {
                                return "<input id='BottlePrice' name='BottlePrice' disabled='disabled' value='" + value + "' readonly='readonly'  style='width:40px' />";
                            }
                            else {
                                return "<input id='BottlePrice' name='BottlePrice'  value='" + value + "' style='width:40px' />";
                            }
                            //return "<input id='BottlePrice' name='BottlePrice' value='" + value + "' readonly='readonly' style='width:40px' />";
                        }
                    },
                    {
                        field: 'TotalPrice', title: '总价', align: "center", width: 60,
                        formatter: function (value, row, index) {
                            if (null == value) value = "";
                            if (quotationState != "0") {
                                return "<input id='TotalPrice' name='TotalPrice' disabled='disabled'  value='" + value + "' readonly='readonly'  style='width:50px' />";
                            }
                            else {
                                return "<input id='TotalPrice' name='TotalPrice'  value='" + value + "' style='width:50px' />";
                            }
                            //return "<input id='TotalPrice' name='TotalPrice' value='" + value + "' readonly='readonly' style='width:50px' />";
                        }
                    },
                    {
                        field: 'IsNewBottle', title: '是否新瓶', align: "center", width: 60,
                        formatter: function (value, row, index) {
                            if (quotationState != "0") {
                                return "<input id='IsNewBottle' name='IsNewBottle' disabled='disabled'  value='" + value + "' style='width:50px' />";
                            }
                            else {
                                return "<input id='IsNewBottle' name='IsNewBottle'  value='" + value + "' style='width:50px' />";
                            }
                            //return "<input id='IsNewBottle' name='IsNewBottle' value='" + value + "' readonly='readonly' style='width:50px' />";
                        }
                    },
                    {
                        field: 'IsPureGas', title: '是否纯气', sortable: false, align: "center", width: 90,
                        formatter: function (value, row, index) {
                            if (quotationState != "0") {
                                return "<input id='IsPureGas' name='IsPureGas' disabled='disabled'  value='" + value + "' style='width:80px' readonly='readonly'/>";
                            }
                            else {
                                return "<input id='IsPureGas' name='IsPureGas'  value='" + value + "' style='width:80px' />";
                            }
                            //return "<input id='IsPureGas' name='IsPureGas' value='" + value + "' style='width:80px' readonly='readonly'/>";
                        }
                    },
                    {
                        field: 'OrderCode', title: '订单编号', align: "center", width: 120,
                        formatter: function (value, row, index) {
                            if (null == value) value = "";
                            if (quotationState != "0") {
                                return "<input id='OrderCode' name='OrderCode' disabled='disabled'  value='" + value + "' readonly='readonly'  style='width:100px' />";
                            }
                            else {
                                return "<input id='OrderCode' name='OrderCode'  value='" + value + "' style='width:100px' />";
                            }
                            //return "<input id='OrderCode' name='OrderCode' value='" + value + "' readonly='readonly'  style='width:100px' />";
                        }
                    },
                    {
                        field: 'StockCode', title: '存货编号', align: "center", width: 120,
                        formatter: function (value, row, index) {
                            if (null == value) value = "";
                            if (quotationState != "0") {
                                return "<input id='StockCode' name='StockCode' disabled='disabled'  value='" + value + "' readonly='readonly'  style='width:180px' />";
                            }
                            else {
                                return "<input id='StockCode' name='StockCode'  value='" + value + "' style='width:180px' />";
                            }
                            //return "<input id='StockCode' name='StockCode' value='" + value + "' readonly='readonly'  style='width:180px' />";
                        }
                    },
                    {
                        field: 'PurchaseType', title: '采购类型', align: "center", width: 60,
                        formatter: function (value, row, index) {
                            if (null == value) value = "";
                            if (quotationState != "0") {
                                return "<input id='PurchaseType' name='PurchaseType' disabled='disabled'  value='" + value + "' readonly='readonly'  style='width:40px' />";
                            }
                            else {
                                return "<input id='PurchaseType' name='PurchaseType'  value='" + value + "' style='width:40px' />";
                            }
                            //return "<input id='PurchaseType' name='PurchaseType' value='" + value + "' readonly='readonly'  style='width:40px' />";
                        }
                    },
                    {
                        field: 'ApplyPerson', title: '使用人员', align: "center", width: 60,
                        formatter: function (value, row, index) {
                            if (null == value) value = "";
                            if (quotationState != "0") {
                                return "<input id='ApplyPerson' name='ApplyPerson' disabled='disabled'  value='" + value + "' readonly='readonly'  style='width:40px' />";
                            }
                            else {
                                return "<input id='ApplyPerson' name='ApplyPerson'  value='" + value + "' style='width:40px' />";
                            }
                            //return "<input id='ApplyPerson' name='ApplyPerson' value='" + value + "' readonly='readonly'  style='width:40px' />";
                        }
                    },
                    {
                        field: 'Note', title: '备注', align: "center", width: 200,
                        formatter: function (value, row, index) {
                            if (null == value) value = "";
                            if (quotationState != "0") {
                                return "<input id='Note' name='Note' disabled='disabled'  value='" + value + "' readonly='readonly'  style='width:180px' />";
                            }
                            else {
                                return "<input id='Note' name='Note'  value='" + value + "'  style='width:180px' />";
                            }
                            //return "<input id='Note' name='Note' value='" + value + "' readonly='readonly'  style='width:180px' />";
                        }
                    }
                ]],
                singleSelect: true,
                striped: true,
                onSelect: function (rowindex, rowData) {
                    if (rowData.ID != null) {
                        loadProdDetailTechParam(rowData.ID);
                        productionDetailID = rowData.ID
                    }
                },
                onLoadSuccess: function () {
                    $("input[name=OrderCount]").numberbox({
                        precision: 0,
                        onChange: function (newValue, oldValue) {
                            var rows = $("#productionDetail").datagrid("getRows");
                            var rowSelect = $("#productionDetail").datagrid("getSelected");
                            if (null != rowSelect) {
                                var i = $("#productionDetail").datagrid("getRowIndex", rowSelect);
                                var $tr = $("#divTableUp tr:eq(" + (parseInt(i + 1) + parseInt(rows.length) + 1) + ")");
                                var singlePrice = $tr.find("#SinglePrice").numberbox('getValue');
                                var bottleCount = $tr.find("#BottleCount").numberbox('getValue');
                                var bottlePrice = $tr.find("#BottlePrice").numberbox('getValue');
                                var totalPrice = singlePrice * newValue + bottleCount * bottlePrice;
                                $tr.find("#TotalPrice").numberbox('setValue', totalPrice);
                            }
                        }
                    });
                    $("input[name=SinglePrice]").numberbox({
                        precision: 2,
                        onChange: function (newValue, oldValue) {
                            var rows = $("#productionDetail").datagrid("getRows");
                            var rowSelect = $("#productionDetail").datagrid("getSelected");
                            if (null != rowSelect) {
                                var i = $("#productionDetail").datagrid("getRowIndex", rowSelect);
                                var $tr = $("#divTableUp tr:eq(" + (parseInt(i + 1) + parseInt(rows.length) + 1) + ")");
                                var orderCount = $tr.find("#OrderCount").numberbox('getValue');
                                var bottleCount = $tr.find("#BottleCount").numberbox('getValue');
                                var bottlePrice = $tr.find("#BottlePrice").numberbox('getValue');
                                var totalPrice = orderCount * newValue + bottleCount * bottlePrice;
                                $tr.find("#TotalPrice").numberbox('setValue', totalPrice);
                            }
                        }
                    });
                    $("input[name=BottleCount]").numberbox({
                        precision: 0,
                        onChange: function (newValue, oldValue) {
                            var rows = $("#productionDetail").datagrid("getRows");
                            var rowSelect = $("#productionDetail").datagrid("getSelected");
                            if (null != rowSelect) {
                                var i = $("#productionDetail").datagrid("getRowIndex", rowSelect);
                                var $tr = $("#divTableUp tr:eq(" + (parseInt(i + 1) + parseInt(rows.length) + 1) + ")");
                                var singlePrice = $tr.find("#SinglePrice").numberbox('getValue');
                                var orderCount = $tr.find("#OrderCount").numberbox('getValue');
                                var bottlePrice = $tr.find("#BottlePrice").numberbox('getValue');
                                var totalPrice = singlePrice * orderCount + newValue * bottlePrice;
                                $tr.find("#TotalPrice").numberbox('setValue', totalPrice);
                            }
                        }
                    });
                    $("input[name=BottlePrice]").numberbox({
                        precision: 2,
                        onChange: function (newValue, oldValue) {
                            var rows = $("#productionDetail").datagrid("getRows");
                            var rowSelect = $("#productionDetail").datagrid("getSelected");
                            if (null != rowSelect) {
                                var i = $("#productionDetail").datagrid("getRowIndex", rowSelect);
                                var $tr = $("#divTableUp tr:eq(" + (parseInt(i + 1) + parseInt(rows.length) + 1) + ")");
                                var orderCount = $tr.find("#OrderCount").numberbox('getValue');
                                var bottleCount = $tr.find("#BottleCount").numberbox('getValue');
                                var singlePrice = $tr.find("#SinglePrice").numberbox('getValue');
                                var totalPrice = orderCount * singlePrice + bottleCount * newValue;
                                $tr.find("#TotalPrice").numberbox('setValue', totalPrice);
                            }
                        }
                    });
                    $("input[name=TotalPrice]").numberbox({
                        precision: 2,
                        editable: false
                    });
                    $("input[name=IsNewBottle]").combobox({
                        data: StaticCombo.isNewBottle,
                        valueField: "value",
                        textField: "text",
                        panelHeight: 'auto'
                    });
                    $("input[name=IsPureGas]").combobox({
                        data: StaticCombo.isPureGas,
                        valueField: "value",
                        textField: "text",
                        panelHeight: 'auto',
                        required: true
                    });

                    //去除单击选中事件
                    var s = $("#productionDetail").datagrid("getPanel");
                    var row = s.find("tr.datagrid-row td[field!=ck]");
                    row.unbind('click').bind('click', function (e) {
                        return false;
                    })

                }
            });

            //初始化报价单输入框下拉列表
            $("#CustomerID").combobox({
                url: '/Logic/BD/CompanyAjax.aspx?method=GetAllCompanyNameList',
                valueField: 'value',
                textField: 'text',
                panelHeight: '400',
                panelWidth: '200',
                mode: 'remote',
                validType: "selectToGet['CustomerID']",
                //editable: false,
                required: true,
                onSelect: function (rec) {
                    var invUrl = '/Logic/BD/CompanyAddressAjax.aspx?method=GetAllCompanyAddressById&companyID=' + rec.value + '&type=0';
                    var recUrl = '/Logic/BD/CompanyAddressAjax.aspx?method=GetAllCompanyAddressById&companyID=' + rec.value + '&type=1';
                    $("#CusRecAddID").combobox('reload', recUrl);
                    $("#CusRecAddID").combobox('clear');
                    $("#CusInvAddID").combobox('reload', invUrl);
                    $("#CusInvAddID").combobox('clear');
                }
            });

            ////初始化供应商客户
            //$("#SupplierID").textbox('setText', '杭州新世纪混合气体有限公司')

            //初始化气体技术参数Datagrid
            loadProdDetailTechParam("0");

            // 根据报价单状态更新按钮状态
            if ("0" != quotationState && "edit" == action) {
                $("a.easyui-linkbutton").linkbutton('disable');
                loadQuotationForm();
            } else if ("edit" == action) {
                loadQuotationForm();
            } else {
                $("#Date").datebox('setValue', datetools.day(new Date()))
            }

            //总价计算绑定
            $("#OrderCountM").numberbox({
                onChange: function (newValue, oldValue) {
                    var singlePrice = $('#SinglePriceM').numberbox('getValue');
                    var bottleCount = $('#BottleCountM').numberbox('getValue');
                    var bottlePrice = $('#BottlePriceM').numberbox('getValue');
                    var totalPrice = singlePrice * newValue + bottleCount * bottlePrice;
                    $('#TotalPriceM').numberbox('setValue', totalPrice);
                }
            });
            $("#SinglePriceM").numberbox({
                onChange: function (newValue, oldValue) {
                    var orderCount = $('#OrderCountM').numberbox('getValue');
                    var bottleCount = $('#BottleCountM').numberbox('getValue');
                    var bottlePrice = $('#BottlePriceM').numberbox('getValue');
                    var totalPrice = orderCount * newValue + bottleCount * bottlePrice;
                    $('#TotalPriceM').numberbox('setValue', totalPrice);
                }
            })

        });

        //加载报价单信息
        function loadQuotationForm() {
            $.ajax({
                type: "POST",
                dataType: "json",
                url: "/Logic/CM/QuotationAjax.aspx?method=GetQuotationDetail",
                data: { 'Id': quotationID },
                success: function (data) {
                    var invUrl = '/Logic/BD/CompanyAddressAjax.aspx?method=GetAllCompanyAddressById&companyID=' + data.CustomerID + '&type=0';
                    var recUrl = '/Logic/BD/CompanyAddressAjax.aspx?method=GetAllCompanyAddressById&companyID=' + data.CustomerID + '&type=1';
                    $("#CusRecAddID").combobox('reload', recUrl);
                    $("#CusInvAddID").combobox('reload', invUrl);
                    //$("#CusRecAddID").combobox('setValue', data.CusRecAddID);
                    //$("#CusInvAddID").combobox('setValue', data.CusInvAddID);
                    //$("#form1").form("load", data);
                    $("#ID").val(data.ID);
                    $("#Code").textbox('setValue', data.Code);
                    $("#Date").datebox('setValue', data.Date);
                    $("#SupPersonID").combobox('setValue', data.SupPersonID);
                    $("#CustomerID").combobox('setValue', data.CustomerID);
                    $("#CusRecAddID").combobox('setValue', data.CusRecAddID);
                    $("#CusInvAddID").combobox('setValue', data.CusInvAddID);
                    $("#Note").textbox('setValue', data.Note);
                }
            });
        }

        // 加载气体技术参数
        function loadProdDetailTechParam(pdID) {
            $("#prodDetailTechParam").datagrid({
                url: '/Logic/CM/QuotationAjax.aspx?method=GetProdTechParam',
                queryParams: { 'Id': pdID },
                loadMsg: '数据加载中请稍后……',
                rownumbers: true,
                toolbar: "#divToobarPTP",
                idField: "ID",
                singleSelect: true,
                columns: [[
                    {
                        field: 'ck', checkbox: true, width: 30
                    },
                    {
                        field: 'ID', hidden: true, width: 30
                    },
                    {
                        field: 'QuotationDetailID', hidden: true, width: 30
                    },
                    {
                        field: 'GasID', title: '气体名称', sortable: true, align: "center", width: 200,
                        formatter: function (value, row, index) {
                            if (null == value) value = "";
                            if (quotationState != "0") {
                                return "<input id='GasID' name='GasID' disabled='disabled'  value='" + value + "' readonly='readonly'  style='width:180px' />";
                            }
                            else {
                                return "<input id='GasID' name='GasID'  value='" + value + "' style='width:180px' />";
                            }
                            //return "<input id='GasID' name='GasID' value='" + value + "' readonly='readonly'  style='width:180px' />";
                        },
                    },
                    {
                        field: 'GasEngName', title: '分子式', sortable: false, align: "center", width: 120,
                        formatter: function (value, row, index) {
                            if (null == value) value = "";
                            if (quotationState != "0") {
                                return "<input id='GasEngName' name='GasEngName' disabled='disabled'  value='" + value + "' readonly='readonly'  style='width:100px' />";
                            }
                            else {
                                return "<input id='GasEngName' name='GasEngName'  value='" + value + "' style='width:100px' readonly='readonly' />";
                            }
                            //return "<input id='GasEngName' name='GasEngName' value='" + value + "' readonly='readonly'  style='width:100px' />";
                        }
                    },
                    {
                        field: 'CusConcen', title: '气体浓度', align: "center", width: 120, formatter: function (value, row, index) {
                            if (quotationState != "0") {
                                return "<input id='CusConcen' name='CusConcen' disabled='disabled'  value='" + Number(value).toFixed(4) * 10000 / 10000 + "' readonly='readonly'  style='width:100px' />";
                            }
                            else {
                                return "<input id='CusConcen' name='CusConcen'  value='" + Number(value).toFixed(4) * 10000 / 10000 + "'  style='width:100px' />";
                            }
                            //return "<input id='CusConcen' name='CusConcen' value='" + Number(value).toFixed(4) * 10000 / 10000 + "' readonly='readonly'  style='width:100px' />";
                        }
                    },
                    {
                        field: 'CusUnit', title: '浓度单位', align: "center", width: 120, formatter: function (value, row, index) {
                            if (quotationState != "0") {
                                return "<input id='CusUnit' name='CusUnit' disabled='disabled'  value='" + value + "' readonly='readonly'  style='width:100px' />";
                            }
                            else {
                                return "<input id='CusUnit' name='CusUnit'  value='" + value + "' style='width:100px' />";
                            }
                            //return "<input id='CusUnit' name='CusUnit' value='" + value + "' readonly='readonly'  style='width:100px' />";
                        }
                    },
                    {
                        field: 'Tolerance', title: '误差容忍度（ppm）', align: "center", width: 120,
                        formatter: function (value, row, index) {
                            if (null == value) value = "";
                            if (quotationState != "0") {
                                return "<input id='Tolerance' name='Tolerance' disabled='disabled'  value='" + value + "' readonly='readonly'  style='width:100px' />";
                            }
                            else {
                                return "<input id='Tolerance' name='Tolerance'  value='" + value + "' style='width:100px' />";
                            }
                            //return "<input id='Tolerance' name='Tolerance' value='" + value + "' readonly='readonly'  style='width:100px' />";
                        }
                    },
                    {
                        field: 'IsBottomGas', title: '是否底气', align: "center", width: 80, formatter: function (value, row, index) {
                            if (quotationState != "0") {
                                return "<input id='IsBottomGas' name='IsBottomGas' disabled='disabled'  value='" + value + "' readonly='readonly'  style='width:70px' />";
                            }
                            else {
                                return "<input id='IsBottomGas' name='IsBottomGas'  value='" + value + "' style='width:70px' />";
                            }
                            //return "<input id='IsBottomGas' name='IsBottomGas' value='" + value + "' readonly='readonly'  style='width:70px' />";
                        }
                    },
                    {
                        field: 'Note', title: '备注', align: "center", width: 200,
                        formatter: function (value, row, index) {
                            if (null == value) value = "";
                            if (quotationState != "0") {
                                return "<input id='Note' name='Note' disabled='disabled'  value='" + value + "' readonly='readonly'  style='width:180px' />";
                            }
                            else {
                                return "<input id='Note' name='Note'  value='" + value + "' style='width:180px' />";
                            }
                            //return "<input id='Note' name='Note' value='" + value + "' readonly='readonly'  style='width:180px' />";
                        }
                    }
                ]],
                singleSelect: true,
                striped: true,
                onLoadSuccess: function () {
                    $("input[name= GasID]").combobox({
                        valueField: "value",
                        textField: "text",
                        url: "/Logic/BD/GasAjax.aspx?method=GetAllGasList",
                        required: true
                    });
                    $("input[name=CusConcen]").numberbox({
                        min: 0, precision: 4, required: true
                    });
                    $("input[name=CusUnit]").combobox({
                        data: StaticCombo.CusGasUnit,
                        valueField: "value",
                        textField: "text",
                        panelHeight: 'auto',
                        editable: false,
                        required: true
                    });
                    $("input[name=Tolerance]").numberbox({
                        min: 0, precision: 2
                    });
                    $("input[name=IsBottomGas]").combobox({
                        data: StaticCombo.isBottomGas,
                        valueField: "value",
                        textField: "text",
                        panelHeight: 'auto',
                        editable: false,
                        required: true
                    })

                }
            })
        }

    </script>

    <script type="text/javascript">

        function funcAdd(tb) {
            data = {};
            if (tb == "#productionDetail") {
                if ("0" != quotationID) {
                    data["QuotationID"] = quotationID;
                    data["ProductName"] = "";
                    data["BottleVolume"] = "8";
                    data["unit"] = "瓶";
                    data["OrderCount"] = "1";
                    data["SinglePrice"] = "0";
                    data["BottleCount"] = "0";
                    data["BottlePrice"] = "0";
                    data["TotalPrice"] = "0";
                    data["IsNewBottle"] = "0";
                    data["IsPureGas"] = "0";
                    //data["OrderCode"] = "";
                    //data["StockCode"] = "";
                    //data["PurchaseType"] = "";
                    //data["ApplyPerson"] = "";
                    //data["Note"] = "";
                } else {
                    com.message('information', '请先保存报价单信息！');
                    return
                }
            } else {
                if (productionDetailID != "" && productionDetailID != "0") {
                    data["QuotationDetailID"] = productionDetailID;
                    data["GasID"] = "0";
                    data["CusConcen"] = "0";
                    data["CusUnit"] = "0";
                    data["Tolerance"] = "0";
                    data["IsBottomGas"] = "0";
                    //data["Note"] = "";
                } else {
                    com.message('information', '请先选择一条产品细则信息！');
                    return
                }
            }
            if (tb == "#productionDetail") {
                inUrl = "/Logic/CM/QuotationAjax.aspx?method=AddProductionDetail"
            } else {
                inUrl = "/Logic/CM/QuotationAjax.aspx?method=AddProdTechParam"
            }
            com.ajax({
                url: inUrl,
                data: data,
                success: function (data) {                   
                    com.message(data.state, data.msg, function () { $(tb).datagrid("reload"); });
                }
            })
        }

        //function funcEdit(tb) {
        //    if (tb == "#productionDetail") {
        //        var rows = $(tb).datagrid("getRows");
        //        for (var i = 0; i < rows.length; i++) {
        //            var $tr = $("#divTableUp tr:eq(" + (parseInt(i + 1) + parseInt(rows.length) + 1) + ")");
        //            //设置只读属性
        //            $tr.find("#ProductName").attr("readonly", false);
        //            $tr.find("#BottleVolume").attr("readonly", false);
        //            $tr.find("#unit").attr("readonly", false);
        //            $tr.find("#OrderCount").numberbox('readonly', false);
        //            $tr.find("#SinglePrice").numberbox('readonly', false);
        //            $tr.find("#BottlePrice").numberbox('readonly', false);
        //            $tr.find("#BottleCount").numberbox('readonly', false);
        //            $tr.find("#TotalPrice").numberbox('readonly', false);
        //            $tr.find("#IsNewBottle").combobox("readonly", false);
        //            $tr.find("#IsPureGas").combobox("readonly", false);
        //            $tr.find("#OrderCode").attr("readonly", false);
        //            $tr.find("#StockCode").attr("readonly", false);
        //            $tr.find("#PurchaseType").attr("readonly", false);
        //            $tr.find("#ApplyPerson").attr("readonly", false);
        //            $tr.find("#Note").attr("readonly", false);
        //        }
        //    } else {
        //        var rows = $(tb).datagrid("getRows");
        //        for (var i = 0; i < rows.length; i++) {
        //            var $tr = $("#divTableBottom tr:eq(" + (parseInt(i + 1) + parseInt(rows.length) + 1) + ")");
        //            //设置只读属性
        //            $tr.find("#GasID").combobox('readonly', false);
        //            $tr.find("#CusConcen").numberbox('readonly', false);
        //            $tr.find("#CusUnit").combobox('readonly', false);
        //            $tr.find("#Tolerance").numberbox('readonly', false);
        //            $tr.find("#IsBottomGas").combobox('readonly', false);
        //            $tr.find("#Note").attr("readonly", false);
        //        }
        //    }
        //    com.message("information", "已开启编辑！");
        //}

        function funcSave(tb) {
            var arr = GetTableData(tb);
            var msg = "";
            var pandRArr = new Array(2);
            pandRArr[0] = tb;
            pandRArr[1] = msg;
            if (checkData(arr, pandRArr)) {
                var data = JSON.stringify(arr);
                var inUrl = "";
                if (tb === "#productionDetail") {
                    inUrl = "/Logic/CM/QuotationAjax.aspx?method=saveProductionDetail";
                } else {
                    inUrl = "/Logic/CM/QuotationAjax.aspx?method=saveProdTechParam";
                }
                com.ajax({
                    data: { 'data': data },
                    url: inUrl,
                    success: function (data) {                
                        com.message(data.state, data.msg, function () {
                            $(tb).datagrid("reload");
                        })
                    }
                })
            } else {
                com.message('information', pandRArr[1]);
            }
        }

        function funcRemove(tb) {
            $.messager.confirm('确认对话框', '您确定删除该记录吗？', function (r) {
                if (r) {
                    var rowData = $(tb).datagrid("getSelected");
                    var inUrl = "";
                    if (rowData) {
                        if (tb == "#productionDetail") {
                            inUrl = "/Logic/CM/QuotationAjax.aspx?method=DelProductionDetail"
                        } else {
                            inUrl = "/Logic/CM/QuotationAjax.aspx?method=DelProdTechParam"
                        }
                        com.ajax({
                            url: inUrl,
                            data: { "Id": rowData.ID },
                            success: function (data) {
                                com.message(data.state, data.msg, function () {
                                    $(tb).datagrid("reload");
                                    $(tb).datagrid('clearSelections');
                                    if (tb == "#productionDetail") {
                                        loadProdDetailTechParam("0");
                                    }
                                })
                            }
                        });
                    }
                }
            });
        }

        function funcAddMulti() {
            $('#dlg').dialog('open');
        }

        function funcSaveMulti() {
            if ($("#addMulti").form('validate')) {
                var dataToSave = com.serializeObj("addMulti");
                if (0 != quotationID) {
                    dataToSave.QuotationID = quotationID;
                    com.ajax({
                        url: '/Logic/CM/QuotationAjax.aspx?method=AddMultiQuotationDetail',
                        data: dataToSave,
                        success: function (data) {
                            com.message(data.state, "保存成功！", function () {
                                $('#dlg').dialog('close');
                                $("#productionDetail").datagrid("reload");
                            });
                        }
                    })
                } else {
                    com.message('information', '请先保存报价单信息！');
                    return
                }
            }
        }

        function GetTableData(tb) {
            var arr = new Array();
            if (tb == "#productionDetail") {
                var rows = $(tb).datagrid("getRows");
                for (var i = 0; i < rows.length; i++) {
                    var $tr = $("#divTableUp tr:eq(" + (parseInt(i + 1) + parseInt(rows.length) + 1) + ")");
                    rows[i]["ProductName"] = $tr.find("#ProductName").val();
                    rows[i]["BottleVolume"] = $tr.find("#BottleVolume").val();
                    rows[i]["unit"] = $tr.find("#unit").val();
                    rows[i]["OrderCount"] = $tr.find("#OrderCount").numberbox('getValue');
                    rows[i]["SinglePrice"] = $tr.find("#SinglePrice").numberbox('getValue');
                    rows[i]["BottlePrice"] = $tr.find("#BottlePrice").numberbox('getValue');
                    rows[i]["BottleCount"] = $tr.find("#BottleCount").numberbox('getValue');
                    rows[i]["TotalPrice"] = $tr.find("#TotalPrice").numberbox('getValue');
                    rows[i]["IsNewBottle"] = $tr.find("#IsNewBottle").combobox("getValue");
                    rows[i]["IsPureGas"] = $tr.find("#IsPureGas").combobox("getValue");
                    rows[i]["OrderCode"] = $tr.find("#OrderCode").val();
                    rows[i]["StockCode"] = $tr.find("#StockCode").val();
                    rows[i]["PurchaseType"] = $tr.find("#PurchaseType").val();
                    rows[i]["ApplyPerson"] = $tr.find("#ApplyPerson").val();
                    rows[i]["Note"] = $tr.find("#Note").val();
                    arr.push(rows[i]);
                }
            } else {
                var rows = $(tb).datagrid("getRows");
                for (var i = 0; i < rows.length; i++) {
                    var $tr = $("#divTableBottom tr:eq(" + (parseInt(i + 1) + parseInt(rows.length) + 1) + ")");
                    rows[i]["GasID"] = $tr.find("#GasID").combobox('getValue');
                    rows[i]["CusConcen"] = $tr.find("#CusConcen").numberbox('getValue');
                    rows[i]["CusUnit"] = $tr.find("#CusUnit").combobox('getValue');
                    rows[i]["Tolerance"] = $tr.find("#Tolerance").numberbox('getValue');
                    rows[i]["IsBottomGas"] = $tr.find("#IsBottomGas").combobox('getValue');
                    rows[i]["Note"] = $tr.find("#Note").val();
                    arr.push(rows[i]);
                }
            }
            return arr;
        }

        //检验产品的气瓶数量和规格是否填写
        function checkData(arr, pAndRes) {
            tb = pAndRes[0];
            msg = pAndRes[1];
            if ("#productionDetail" === tb) {
                for (var i = 0; i < arr.length; i++) {
                    if ("0" == arr[i]["OrderCount"] || "0" == arr[i]["BottleVolume"]) {
                        msg = "气瓶规格和订货数量不能为0！";
                        pAndRes[1] = msg;
                        return false;
                    } else if ("" == arr[i]["OrderCount"] || "" == arr[i]["BottleVolume"]) {
                        msg = "气瓶规格和订货数量不能为空！";
                        pAndRes[1] = msg;
                        return false;
                    }
                }
            }
            return true;
        }

        function funcSaveQuotation() {
            var customer = $("#CustomerID").textbox('getValue')
            if (null != customer) {
                if ($("#form1").form('validate')) {
                    var getUrl = "/Logic/CM/QuotationAjax.aspx?method=";
                    if (action == "add") {
                        getUrl += "AddQuotation"
                    } else {
                        getUrl += "EditQuotation"
                    }
                    var quotation = com.serializeObj("form1");
                    quotation.SupplierID = 2;
                    com.ajax({
                        url: getUrl,
                        data: quotation,
                        success: function (data) {
                            com.message(data.state, "保存成功！", function () {
                                $("#quotationSave").linkbutton('disable');
                                quotationID = data.msg;
                                loadQuotationForm();
                                $("#productionDetail").datagrid("load", { "Id": quotationID });
                                //$("#divTotal").tabs('select', '产品细则');
                            });
                        }
                    })
                }
            } else {
                com.message("information", "请选择客户！");
            }
        }

    </script>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
    <div id="divTotal" class="easyui-tabs">
        <%--报价单信息--%>
        <div id="quotation" title="报价单信息" style="overflow: auto; padding: 20px; height: 96%; width: 96%">
            <div id="divToobarQuotation" style="background-color: #EFEFEF; width: 100%">
                <a href="javascript:void(0)" id="quotationSave" class="easyui-linkbutton" onclick="funcSaveQuotation()" data-options="iconCls:'icon-add',plain:true">保存</a>
            </div>
            <div class="container_16" style="height: auto">
                <form id="form1">
                    <div id="title" class="grid_16" style="text-align: center">
                        <h1>报价单</h1>
                        <input type="hidden" id="ID" name="ID" />
                    </div>
                    <div class="grid_2 lbl" style="text-align: right;">
                        报价单编号 :
                    </div>
                    <div class="grid_2 val" style="text-align: left;">
                        <input type="text" id="Code" name="Code" class="easyui-textbox" readonly="true" />
                    </div>
                    <div class="grid_2 lbl" style="text-align: right;">
                        报价日期 :
                    </div>
                    <div class="grid_2 val" style="text-align: left;">
                        <input type="text" id="Date" name="Date" class="easyui-datebox" />
                    </div>
                    <div class="Clear"></div>
                    <div class="grid_16" style="height: 20px"></div>
                    <div class="grid_2 lbl" style="text-align: right;">
                        供应商单位 :
                    </div>
                    <div class="grid_2 val" style="text-align: left;">
                        <input type="text" id="SupplierID" name="SupplierID" class="easyui-textbox" data-options="editable:false,value:'杭州新世纪混合气体有限公司'" />
                    </div>
                    <div class="grid_2 lbl" style="text-align: right;">
                        发件人 :
                    </div>
                    <div class="grid_2 val" style="text-align: left;">
                        <input type="text" id="SupPersonID" name="SupPersonID" class="easyui-combobox" validtype="selectToGet['SupPersonID']" data-options="url:'/Logic/BD/CompanyContactAjax.aspx?method=GetAllContactNameList&companyID=2',textField:'text',valueField:'value',panelHeight:'auto',onLoadSuccess: function () {var data = $('#SupPersonID').combobox('getData'); if (data && data.length > 0) {$('#SupPersonID').combobox('setValue',data[0].value);}}" />
                    </div>
                    <div class="Clear"></div>
                    <div class="grid_16" style="height: 20px"></div>
                    <div class="grid_2 lbl" style="text-align: right;">
                        客户单位 :
                    </div>
                    <div class="grid_2 val" style="text-align: left;">
                        <input type="text" id="CustomerID" name="CustomerID" />
                    </div>
                    <div class="grid_2 lbl" style="text-align: right;">
                        收货地址 :
                    </div>
                    <div class="grid_2 val" style="text-align: left;">
                        <input type="text" id="CusRecAddID" name="CusRecAddID" class="easyui-combobox" validtype="selectToGet['CusRecAddID']" data-options="textField:'text',valueField:'value',panelHeight:'auto',onLoadSuccess: function () {var data = $('#CusRecAddID').combobox('getData'); if (data && data.length > 0) {$('#CusRecAddID').combobox('setValue',data[0].value)}}" />
                    </div>
                    <div class="grid_2 lbl" style="text-align: right;">
                        发票地址 :
                    </div>
                    <div class="grid_2 val" style="text-align: left;">
                        <input type="text" id="CusInvAddID" name="CusInvAddID" class="easyui-combobox" validtype="selectToGet['CusRecAddID']" data-options="textField:'text',valueField:'value',panelHeight:'auto', onLoadSuccess: function () {var data = $('#CusInvAddID').combobox('getData'); if (data && data.length > 0) {$('#CusInvAddID').combobox('setValue',data[0].value)}}" />
                    </div>
                    <div class="grid_16">
                        <hr style="width: 102%; margin-left: 25px" />
                    </div>
                    <div id="title2" class="grid_16" style="text-align: center">
                        <h1>收款信息</h1>
                    </div>
                    <div class="grid_2 lbl" style="text-align: right;">
                        单位 :
                    </div>
                    <div class="grid_2 val" style="text-align: left;">
                        <input class="easyui-textbox" id="SellerCompany" name="SellerCompany" data-options="value:'杭州新世纪混合气体有限公司'" readonly="true" />
                    </div>
                    <div class="grid_2 lbl" style="text-align: right;">
                        开户行 :
                    </div>
                    <div class="grid_2 val" style="text-align: left;">
                        <input class="easyui-textbox" id="SellerBank" name="SellerBank" data-options="value:'工商银行杭州市半山支行'" readonly="true" />
                    </div>
                    <div class="grid_2 lbl" style="text-align: right;">
                        账号 :
                    </div>
                    <div class="grid_2 val" style="text-align: left;">
                        <input class="easyui-textbox" id="SellerAccount" name="SellerAccount" data-options="value:'1202020019900012618'" readonly="true" />
                    </div>
                    <div class="grid_16">
                        <hr style="width: 102%; margin-left: 25px" />
                    </div>
                    <div class="grid_2 lbl" style="text-align: right;">
                        备注 :
                    </div>
                    <div class="grid_12 val" style="text-align: left;">
                        <input class="easyui-textbox" id="Note" name="Note" data-options="multiline:true,width:390,height:40" />
                    </div>
                </form>
            </div>
        </div>
        <%--报价单细则--%>
        <div id="productionDetailTab" title="产品细则" style="overflow: auto; padding: 20px; width: 96%; height: 96%">
            <div id="divTableUp" style="overflow: hidden; height: auto; width: 100%; text-align: center; margin: 0 auto">
                <div id="divToobarPD" style="background-color: #EFEFEF; width: 100%">
                    <a href="javascript:void(0)" id="btnAddPD" class="easyui-linkbutton" onclick="funcAdd('#productionDetail')"
                        data-options="iconCls:'icon-add',plain:true">新增</a> &nbsp;&nbsp;
                     <%--<a href="javascript:void(0)" id="btnEditPD" class="easyui-linkbutton" onclick="funcEdit('#productionDetail')"
                         data-options="iconCls:'icon-edit',plain:true">编辑</a> &nbsp;&nbsp;--%>
                <a href="javascript:void(0)" id="btnSavePD" class="easyui-linkbutton" onclick="funcSave('#productionDetail')"
                    data-options="iconCls:'icon-save',plain:true">保存</a> &nbsp;&nbsp;
                <a href="javascript:void(0)" id="btnDelPD" class="easyui-linkbutton" onclick="funcRemove('#productionDetail')"
                    data-options="iconCls:'icon-remove',plain:true">删除</a> &nbsp;&nbsp;
                <a href="javascript:void(0)" id="btnAddMultiPD" class="easyui-linkbutton" onclick="funcAddMulti()"
                    data-options="iconCls:'icon-page_excel',plain:true">添加多行</a>
                </div>
                <table id="productionDetail" style="width: 100%;" title="产品细则"></table>
            </div>
            <div id="dlg" title="添加多行" class="easyui-dialog" data-options="closed:true" style="width: 780px; height: 540px">
                <div class="container_12" style="height: auto; width: 600px">
                    <form id="addMulti">
                        <div id="title3" class="grid_12" style="text-align: center; width: 600px">
                            <h1>产品信息</h1>
                            <input type="hidden" id="QuotationID" name="QuotationID" value="0" />
                        </div>
                        <div class="grid_12" style="width: 600px">
                            <hr style="width: 102%; margin-left: 25px" />
                        </div>
                        <div class="grid_2 lbl" style="text-align: right;">
                            产品名称 :
                        </div>
                        <div class="grid_1 val" style="text-align: left;">
                            <input type="text" id="ProductName" name="ProductName" class="easyui-textbox" data-options="value:''" />
                        </div>
                        <div class="grid_2 lbl" style="text-align: right;">
                            规格（L） :
                        </div>
                        <div class="grid_1 val" style="text-align: left;">
                            <input type="text" id="BottleVolume" name="BottleVolume" class="easyui-textbox" data-options="value:8,required:true" />
                        </div>
                        <div class="grid_2 lbl" style="text-align: right;">
                            单位 :
                        </div>
                        <div class="grid_1 val" style="text-align: left;">
                            <input type="text" id="unit" name="unit" class="easyui-textbox" data-options="value:'瓶'" />
                        </div>
                        <div class="Clear"></div>
                        <div class="grid_2 lbl" style="text-align: right;">
                            计划数量 :
                        </div>
                        <div class="grid_1 val" style="text-align: left;">
                            <input type="text" id="OrderCountM" name="OrderCount" class="easyui-numberbox" data-options="precision:0,value:1,required:true " />
                        </div>
                        <div class="grid_2 lbl" style="text-align: right;">
                            单价 :
                        </div>
                        <div class="grid_1 val" style="text-align: left;">
                            <input type="text" id="SinglePriceM" name="SinglePrice" class="easyui-numberbox" data-options="precision:2,value:0" />
                        </div>
                        <div class="grid_2 lbl" style="text-align: right;">
                            钢瓶数量 :
                        </div>
                        <div class="grid_1 val" style="text-align: left;">
                            <input type="text" id="BottleCountM" name="BottleCount" class="easyui-numberbox" data-options="precision:0,value:0,onChange:function(newValue,oldValue){
                                    var bottlePrice = $('#BottlePriceM').numberbox('getValue');
                                    var singlePrice = $('#SinglePriceM').numberbox('getValue');
                                    var orderCount = $('#OrderCountM').numberbox('getValue');
                                    var totalPrice = bottlePrice * newValue + singlePrice*orderCount;
                                    $('#TotalPriceM').numberbox('setValue',totalPrice)
                                }" />
                        </div>
                        <div class="grid_2 lbl" style="text-align: right;">
                            钢品价格 :
                        </div>
                        <div class="grid_1 val" style="text-align: left;">
                            <input type="text" id="BottlePriceM" name="BottlePrice" class="easyui-numberbox" data-options="precision:2,value:0,onChange:function(newValue,oldValue){
                                    var bottleCount = $('#BottleCountM').numberbox('getValue');
                                    var singlePrice = $('#SinglePriceM').numberbox('getValue');
                                    var orderCount = $('#OrderCountM').numberbox('getValue');
                                    var totalPrice = bottleCount * newValue + singlePrice * orderCount;
                                    $('#TotalPriceM').numberbox('setValue',totalPrice)
                                }" />
                        </div>
                        <div class="grid_2 lbl" style="text-align: right;">
                            总价 :
                        </div>
                        <div class="grid_1 val" style="text-align: left;">
                            <input type="text" id="TotalPriceM" name="TotalPrice" class="easyui-numberbox" data-options="precision:2,value:0,editable:false" />
                        </div>
                        <div class="Clear"></div>
                        <div class="grid_2 lbl" style="text-align: right;">
                            是否新瓶 :
                        </div>
                        <div class="grid_1 val" style="text-align: left;">
                            <input type="text" id="IsNewBottle" name="IsNewBottle" class="easyui-combobox" data-options="textField:'text',valueField:'value',panelHeight:'auto', data:StaticCombo.isNewBottle,editable:false,value:1" />
                        </div>
                        <div class="grid_2 lbl" style="text-align: right;">
                            是否纯气 :
                        </div>
                        <div class="grid_1 val" style="text-align: left;">
                            <input class="easyui-combobox" id="IsPureGas" name="IsPureGas" data-options="valueField:'value',textField:'text',panelHeight:'auto',data: StaticCombo.isPureGas,value:0,required:true" />
                        </div>
                        <div class="Clear"></div>
                        <div class="grid_12" style="width: 600px">
                            <hr style="width: 102%; margin-left: 25px" />
                        </div>
                        <div id="title4" class="grid_12" style="text-align: center; width: 600px">
                            <h1>打印信息</h1>
                        </div>
                        <div class="grid_2 lbl" style="text-align: right;">
                            订单编号 :
                        </div>
                        <div class="grid_1 val" style="text-align: left;">
                            <input class="easyui-textbox" id="OrderCode" name="OrderCode" data-options="validType:'length[0,25]'" />
                        </div>
                        <div class="grid_2 lbl" style="text-align: right;">
                            存货编号 :
                        </div>
                        <div class="grid_1 val" style="text-align: left;">
                            <input class="easyui-textbox" id="StockCode" name="StockCode" data-options="validType:'length[0,25]'" />
                        </div>
                        <div class="Clear"></div>
                        <div class="grid_2 lbl" style="text-align: right;">
                            采购类型 :
                        </div>
                        <div class="grid_1 val" style="text-align: left;">
                            <input class="easyui-textbox" id="PurchaseType" name="PurchaseType" data-options="validType:'length[0,25]'" />
                        </div>
                        <div class="grid_2 lbl" style="text-align: right;">
                            使用人员 :
                        </div>
                        <div class="grid_1 val" style="text-align: left;">
                            <input class="easyui-textbox" id="ApplyPerson" name="ApplyPerson" data-options="validType:'length[0,25]'" />
                        </div>
                        <div class="Clear"></div>
                        <div class="grid_2 lbl" style="text-align: right;">
                            备注 :
                        </div>
                        <div class="grid_4 val" style="text-align: left;">
                            <input class="easyui-textbox" id="Note1" name="Note" data-options="multiline:true,width:390,height:40" />
                        </div>
                        <div class="Clear"></div>
                        <div class="grid_12" style="width: 600px">
                            <hr style="width: 102%; margin-left: 25px" />
                        </div>
                        <div class="grid_2 lbl" style="text-align: right;">
                            保存数量 :
                        </div>
                        <div class="grid_4 val" style="text-align: left;">
                            <input type="text" id="Count" name="Count" class="easyui-numberbox" data-options="precision:0,width:390,required:true,value:1" />
                        </div>
                        <div class="Clear"></div>
                        <div class="grid_12" style="width: 600px; text-align: center">
                            <input type="button" id="saveMulti" onclick="funcSaveMulti()" value="提交保存" style="align-content: center; width: 96%" />
                        </div>
                    </form>
                </div>
            </div>
            <div id="divTableBottom" style="overflow: hidden; height: auto; width: 100%; text-align: center; margin: 0 auto">
                <div id="divToobarPTP" style="background-color: #EFEFEF; width: 100%">
                    <a href="javascript:void(0)" id="btnAddPTP" class="easyui-linkbutton" onclick="funcAdd('#prodDetailTechParam')"
                        data-options="iconCls:'icon-add',plain:true">新增</a> &nbsp;&nbsp;
                    <%--<a href="javascript:void(0)" id="btnEditPTP" class="easyui-linkbutton" onclick="funcEdit('#prodDetailTechParam')"
                        data-options="iconCls:'icon-edit',plain:true">编辑</a> &nbsp;&nbsp;--%>
                <a href="javascript:void(0)" id="btnSavePTP" class="easyui-linkbutton" onclick="funcSave('#prodDetailTechParam')"
                    data-options="iconCls:'icon-save',plain:true">保存</a> &nbsp;&nbsp;
                <a href="javascript:void(0)" id="btnDelPTP" class="easyui-linkbutton" onclick="funcRemove('#prodDetailTechParam')"
                    data-options="iconCls:'icon-remove',plain:true">删除</a> &nbsp;&nbsp;
                </div>
                <table id="prodDetailTechParam" style="width: 100%;" title="产品技术参数"></table>
            </div>
        </div>
    </div>

</asp:Content>
